package com.by.remote;

import com.by.config.FeignConfig;
import com.by.remote.impl.StockRemoteClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @version 1.0
 * @Author 彭彦彬
 * @Date 2025/4/2 14:29
 * @注释
 */
@FeignClient(
        value = "sc-stock",
        configuration = {FeignConfig.class},
        fallbackFactory = StockRemoteClientFallbackFactory.class // 添加 fallbackFactory
)
public interface StockRemoteClient {
    @GetMapping("/stock")
    Map query(@RequestParam("id") int id);
}
